//
//  HHStackSample.swift
//  HHSwiftuiPractice
//
//  Created by YL-Hong on 2023/9/27.
//

import SwiftUI

struct HHStackSample: View {
    var body: some View {
        
        ZStack{
            
            LinearGradient(colors: [.blue,.purple], startPoint: .top, endPoint: .bottom)
                .edgesIgnoringSafeArea(.all) //安全区
            
            VStack(spacing: 20){
                
                HStack(spacing: 20){
                                   Image(systemName: "star.fill")
                                       .foregroundColor(.yellow)
                                       .font(.largeTitle)
                                   Text("SwiftUI")
                                       .foregroundColor(.white)
                                       .font(.headline)
                               }
                
                VStack(spacing: 10) {
                                        Text("Welcome to")
                                            .foregroundColor(.white)
                                        Text("Stack World!")
                                            .foregroundColor(.white)
                                            .font(.largeTitle)
                                            .bold()
                                    }
                                    .padding()
                                    .background(Color.black.opacity(0.5))
                                    .cornerRadius(10)
                

            }
            
           
        }
         
    }
}

struct HHStackSample_Previews: PreviewProvider {
    static var previews: some View {
        HHStackSample()
    }
}
